import * as Types from 'containers/ActionTypes';

export default function (state = {}, action) {
  switch (action.type) {
  case Types.WORK.UPDATE_LIKE_REQUEST:
    return Object.assign({}, state, {
      likeActionStatus: 'like_request',
    });
  case Types.WORK.UPDATE_LIKE_SUCCESS:
    return Object.assign({}, state, {
      likeActionStatus: 'like_success',
    });
  case Types.WORK.UPDATE_LIKE_FAILED:
    return Object.assign({}, state, {
      likeActionStatus: 'like_failed',
    });
  case Types.WORK.UPDATE_UNLIKE_REQUEST:
    return Object.assign({}, state, {
      likeActionStatus: 'unlike_request',
    });
  case Types.WORK.UPDATE_UNLIKE_SUCCESS:
    return Object.assign({}, state, {
      likeActionStatus: 'unlike_success',
    });
  case Types.WORK.UPDATE_UNLIKE_FAILED:
    return Object.assign({}, state, {
      likeActionStatus: 'unlike_failed',
    });
  default:
    return state;
  }
}
